/*
 * Copyright (C) 2009 Rafael Fernandes
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.phonebooksharing.services.ejb3.facade;

import java.util.ArrayList;

import javax.ejb.Local;

import com.phonebooksharing.dto.GenericTransferDTO;
import com.phonebooksharing.dto.ProfileItem;
import com.phonebooksharing.dto.ReturnItem;
import com.phonebooksharing.dto.friend.GroupItem;
import com.phonebooksharing.dto.gallery.ImageGalleryItem;
import com.phonebooksharing.dto.gallery.VideoGalleryItem;
import com.phonebooksharing.dto.gallery.WishlistItem;

/**
 * Interface exposing the facade methods for Profile Manipulation and retrieval
 * 
 * @author <a href='mailto:luizrafael@gmail.com'>Rafael Fernandes</a>
 *
 */
@Local //may be changed to Remote if in cluster
public interface ProfileFacade {
    public ReturnItem validate(ProfileItem pi);
    public ReturnItem addAsyncProcessor(GenericTransferDTO gt, int type);
    public void scheduleAccountActivation(GenericTransferDTO gt);
    
    /* Image management*/
    public String getImagePath(Long imageID);
    public String getImagePathAndIncreaseViewCounter(Long imageID);
    public ReturnItem startSharingImage(ArrayList<ImageGalleryItem> list);
    public ReturnItem stopSharingImage(ArrayList<ImageGalleryItem> list);
    public ArrayList<ImageGalleryItem> addImagesToGallery(String authItem, ArrayList<ImageGalleryItem> list);
    public void setImagePathToImageGallery(Long imageID, String imagePath);
    public ArrayList<Integer> getImageGalleryDeviceIdList(String authItem);
    public ArrayList<ImageGalleryItem> getSharingImages(String authItem);
    public ArrayList<ImageGalleryItem> getNonSharingImages(String authItem);

    /* Video Management*/
    public ReturnItem startSharingVideo(ArrayList<VideoGalleryItem> list);
    public ReturnItem stopSharingVideo(ArrayList<VideoGalleryItem> list);
    public ArrayList<VideoGalleryItem> getSharingVideos(String authItem);
    public ArrayList<VideoGalleryItem> getNonSharingVideos(String authItem);
    public ArrayList<VideoGalleryItem> addVideosToGallery(String authItem, ArrayList<VideoGalleryItem> list);
    public void setVideoPathToVideoGallery(Long videoID, String videoPath);
    public void setVideoThumbPathToVideoGallery(Long videoID, String videoThumbPath);

    public ArrayList<Integer> getVideoGalleryDeviceIdList(String authItem);
    public ArrayList<ImageGalleryItem> browseImageGallery(String authItem, int contactID, int page, int pageSize);
    public ArrayList<VideoGalleryItem> browseVideoGallery(String authItem, int contactID, int page, int pageSize);
    public String getVideoThumbPath(Long id);
    public String getVideoPathAndIncreaseViewCounter(Long id);
    
    public ReturnItem addProductToWishlist(String authItem, ArrayList<WishlistItem> list);
    public ArrayList<WishlistItem> browseWishlistGallery(String authItem, int contactID, int page, int pageSize);
    public ArrayList<WishlistItem> getSharingWishlist(String authItem);
    public ArrayList<WishlistItem> getNonSharingWishlist(String authItem);
    public ReturnItem startSharingWishlist(ArrayList<WishlistItem> list);
    public ReturnItem stopSharingWishlist(ArrayList<WishlistItem> list);
    public ReturnItem updatePrivacy(String authItem, ArrayList<GroupItem> list);
}
